import {data} from "@/play/data.js";
import {musicList} from "@/play/data.js";
export default{
    data(){
        return{
           data,
           musicList
        }
    },
    methods:{
        addMusic:function(){//为音乐列表增加播放的音乐
           
            let list={
                musicId:data.musicId,
                musicName:data.musicName,
                author:data.author,
                musicUrl:data.musicUrl,
                picUrl:data.picUrl
            }
            console.log(data.author)
            data.myList.push(list)
            console.log(musicList)
        }/*,
        delMusic:function(name){
            for(var i=0;i<musicList.length;i++){
                if(musicList[i].title==name){
                    for(var j=i;j<musicList.length-1;j++){
                        musicList[i]=musicList[i+1]
                    }
                }
            }
        }*/
    }
}